import pymysql
conn = pymysql.connect(host='localhost',port=3306,user='root',passwd='123456',db='book')
cursor = conn.cursor()
cursor.execute("select * from book")
for row in cursor:
    print(row)